# $Id: PKGBUILD 173707 2012-12-21 16:29:38Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=freetype2
pkgver=2.4.11
pkgrel=2
pkgdesc="TrueType font rendering library"
arch=(i686 x86_64)
license=('GPL')
url="http://freetype.sourceforge.net"
depends=('zlib' 'bzip2' 'sh')
options=('!libtool')
source=(http://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.bz2
        freetype-2.3.0-enable-spr.patch
        freetype-2.2.1-enable-valid.patch)
md5sums=('b93435488942486c8d0ca22e8f768034'
         '816dc8619a6904a7385769433c0a8653'
         '214119610444c9b02766ccee5e220680')

build() {
  cd "${srcdir}/freetype-${pkgver}"
  patch -Np1 -i "${srcdir}/freetype-2.3.0-enable-spr.patch"
  patch -Np1 -i "${srcdir}/freetype-2.2.1-enable-valid.patch"

  ./configure --prefix=/usr
  make
}

check() {
  cd "${srcdir}/freetype-${pkgver}"
  make -k check
}

package() {
  cd "${srcdir}/freetype-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
